import { Schema as _Schema, model } from "mongoose";
const Schema = _Schema;

const CourseSchema = new Schema({
    coursename: {
        type: String,
        required: true,
        unique: true,
        trim: true,
    },
    creator: {
        type: Schema.Types.ObjectId,
        ref: 'user',
    },
    about: {
        type: String,
    },
});

const Course = model("course", CourseSchema);

export default Course;
